package com.shunbo.convenient.service.impl;

import com.github.pagehelper.Page;
import com.shunbo.convenient.dao.MenuMapper;
import com.shunbo.convenient.service.MenuService;
import com.shunbo.convenient.vo.Menu;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author weizhuang
 */

@Service
@Transactional
public class MenuServiceImpl implements MenuService {

    @Resource
    private MenuMapper menuMapper;

    @Override
    public Integer save(Menu obj) {
        return menuMapper.save(obj);
    }

    @Override
    public Integer update(Menu obj) {
        return menuMapper.update(obj);
    }

    @Override
    public Integer delete(String obj) {
        return menuMapper.delete(obj);
    }

    @Override
    public Menu findById(String obj) {
        return menuMapper.findById(obj);
    }

    @Override
    public List<Menu> findAll(Menu obj) {
        return menuMapper.findAll(obj);
    }

    @Override
    public Page<Menu> findByIds(List<String> ids) {
        return menuMapper.findByIds(ids);
    }
}
